<%-- 
    Document   : allFile
    Created on : 2015-8-13, 17:17:53
    Author     : jansing
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@taglib prefix="pg" uri="http://jsptags.com/tags/navigation/pager" %>
<!DOCTYPE html>
<html lang="zh-cn">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=Edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>E-TOP在线文档管理系统</title>
        <link rel="stylesheet" href="<c:url value = "/css/font-awesome.css"/>"/>
        <link rel="stylesheet" type="text/css" href="<c:url value = "/css/all-page.css"/>" />
        <link rel="stylesheet" type="text/css" href="<c:url value = "/css/show-portrait.css" />"/>
        <link rel="stylesheet" type="text/css" href="<c:url value = "/css/all-file.css" />"/>
    </head>

    <body class="all-page all-file-page
          <c:if test="${not empty loginUser}">logined</c:if>
          <c:if test="${loginUser.role eq 2}">manage-logined</c:if>
              ">
          <jsp:include page="/WEB-INF/inc/header.jsp"/>
          <!--以上 header-->
          <!--以下 main-container-->
          <div class="main-container">
              <!--以下 分类菜单-->
              <div class="docss">
                  <p class="count">
                      <span class="adjust-text">
                          <span class="fa fa-share-alt-square fa-fw"></span> E-TOP在线海量文档
                      </span>
                      <span class="adjust-number">
                          <span class="number first-number">0</span>
                          <span class="number">0</span>
                          <span class="number">0</span>
                          <span class="number">3</span>
                          <span class="number">9</span>
                          <span class="number">7</span>
                          <span class="number">6</span><span class="number">3</span></span>
                  </p>
              </div>
              <div class="file-menu">
                  <ul class="select-ul">
                      <c:forEach var="cate1" items="${rootCategory.cateSet}">
                          <li><a href="#"><span class="fa fa-plus-circle fw"></span>${cate1.name}</a>
                              <ul><c:forEach var="cate2" items="${cate1.cateSet}">
                                      <li><a href="#"><span class="fa fa-plus-circle fw"></span>${cate2.name}</a>
                                          <ul><c:forEach var="cate3" items="${cate2.cateSet}">
                                                  <li><span></span><a href="allFile?cateId=${cate3.id}">${cate3.name}</a></li>
                                                      </c:forEach>
                                          </ul>
                                      </li>
                                  </c:forEach>
                              </ul>
                          </li>
                      </c:forEach>
                  </ul>
              </div>
              <!--以上 分类菜单-->
              <!--以下 所有文档-->
              <div class="assortment">
                  <!--以下是assortmentHeader-->
                  <div class="assortHeader">
                      <div class="select-button-ul">
                          <button class="select-button">文档名</button>
                      </div>
                      <!--以上是分类框-->
                      <!--以下是 评论、浏览量等标题-->
                      <ul class="commentTitle">
                          <li><span class="fa fa-comments fa-fw"></span>总评论</li>
                          <li><span class="fa fa-search fa-fw"></span>浏览量</li>
                          <li><span class="fa fa-cloud-download fa-fw"></span>下载量</li>
                          <li><span class="fa fa-cloud-upload fa-fw"></span>上传者</li>
                          <li><span class="fa fa-clock-o fa-fw"></span>上传时间</li>
                      </ul>
                      <!--以上是 评论、浏览量等标题-->
                  </div>
                  <!--以上是assortmentHeader-->
                  <!--以下是文档详细信息-->
                  <ul class="one-document">
                      <c:forEach var="docu" items="${pager.datas}">
                          <li>
                              <a class="doc-name" href="onlineBrowse/${docu.id}">
                                  <span class="fa fa-file-word-o fa-fw"></span>${docu.name}
                              </a>
                              <div class="comment">
                                  <span class="fa fa-star fa-fw"></span>
                                  <span class="fa fa-star fa-fw"></span>
                                  <span class="fa fa-star fa-fw"></span>
                                  <span class="fa fa-star fa-fw"></span>
                                  <span class="fa fa-star fa-fw"></span>
                                  <span class="CommentCount">${docu.comCount}</span>
                              </div>
                              <p class="page-views">${docu.views}</p>
                              <p class="downloads">${docu.downtotal}</p>
                              <p class="uploader"><a href="#">${docu.upUser.username}</a></p>
                              <p class="date-uploaded"><fmt:formatDate value="${docu.upDate}" type="date"/></p>
                          </li>
                      </c:forEach>
                  </ul>
                  <!--以上是文档详细信息-->

                  <!--以下 分页-->
                  <div class="page-divider">
                      <div class="adjust-page-divider">
                          <pg:pager items="${pager.totalRecord }" export="curPage=pageNumber" url="allFile">
                              <pg:param name="cateId" value="${cateId}"/>
                              <c:forEach items="mothod,name" var="p">
                                  <pg:param name="${p}"/>
                              </c:forEach>
                              <pg:last>
                                  <span>总页数:<span>${pageNumber }</span></span>
                              </pg:last>
                              <pg:first><a class="pager" href="${pageUrl }">首页</a></pg:first>
                              <pg:prev><a class="pager" href="${pageUrl }"><span class="fa fa-angle-left fa-fw"></span>上一页</a></pg:prev>
                              <pg:pages>
                                  <c:choose>
                                      <c:when test="${curPage eq pageNumber }">【${pageNumber }】</c:when>
                                      <c:otherwise><a href="${pageUrl }">${pageNumber }</a></c:otherwise>
                                  </c:choose>
                              </pg:pages>
                              <pg:next ifnull="true"> <a class="pager" href="${pageUrl }">下一页<span class="fa fa-angle-right fa-fw"></span></a></pg:next>
                              <pg:last> <a class="pager" href="${pageUrl }">尾页</a></pg:last>
                          </pg:pager>

                      </div>
                      <!--以上 分页-->
                  </div>
                  <!--以上 所有文档-->
              </div>
          </div>
          <!--以上 main-container-->
          <jsp:include page="/WEB-INF/inc/footer.jsp"/>
          <script src="<c:url value = "/js/jquery-1.11.2.js"/>"></script>
          <script src="<c:url value = "/js/home-page.js"/>" ></script>
          <!--以下 不加会报错-->
          <script src="<c:url value = "/js/jquery.mCustomScrollbar.concat.min.js"/>"></script>
          <script src="<c:url value = "/js/all-file.js"/>"></script>
    </body>

</html>
